
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ page isELIgnored="false"%> 
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%  
    String path = request.getContextPath();  
    String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";  
%>  
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<base href="<%=basePath%>">  
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>用户管理</title>
<link rel="stylesheet" href="css/bootstrap.css" />
<link rel="stylesheet" href="css/css.css" />
<script type="text/javascript" src="js/jquery1.9.0.min.js"></script>
<script type="text/javascript" src="js/bootstrap.min.js"></script>
<script type="text/javascript" src="js/sdmenu.js"></script>
<script type="text/javascript" src="js/laydate/laydate.js"></script>

</head>

<body> 
<script type="text/javascript">
var myMenu;
window.onload = function() {
	myMenu = new SDMenu("my_menu");
	myMenu.init();
};
</script>

     <div class="Switch"></div>
     <script type="text/javascript">
	$(document).ready(function(e) {
    $(".Switch").click(function(){
	$(".left").toggle();
	 
		});
});
</script>
 <script>
!function(){
laydate.skin('molv');
laydate({elem: '#Calendar'});
laydate.skin('molv');
laydate({elem: '#Calendar2'});
}();
</script>
<script>
	function addSubmit(){
		document.f1.action = "${pageContext.request.contextPath}/users/add.action";
		var username = document.f1.username.value;
		var password = document.f1.password.value;
		var sex = document.f1.sex.value;
		var age = document.f1.age.value;
		var telephone = document.f1.telephone.value;
		var num = document.f1.num.value;
		var job = document.f1.job.value;
		if((username==null||username=="") && (password==null||password=="") && (sex==null||sex=="") && (age==null||age=="") && (telephone==null||telephone=="") && (num==null||num=="") && (job==null||job=="")){
			alert("用户不能为空，请填入信息");
		}else{
			f1.submit();
		}
		
		
	}
</script>
<div class="right"  id="mainFrame">
     <div class="right_cont">
 		<ul class="breadcrumb">
 			当前位置：<a href="#">首页</a> <span class="divider">/</span>
  			<a >楼房管理</a> <span class="divider">/</span>项目管理
		</ul>
      	<div class="title_right"><span class="pull-right margin-bottom-5">
      	<a  class="btn btn-info btn-small"  id="modal-9735581" href="#modal-container-9735581" role="button" data-toggle="modal"><i class="icon-plus icon-white"></i> 添加项目</a></span><strong>项目管理</strong></div>
    	<div id="modal-container-9735581" class="modal hide fade" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true" style="width:600px; margin-left:-300px; top:20%">
				<div class="modal-header">
					 <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
					<h3 id="myModalLabel">添加项目信息</h3>
		</div>
<!-- 弹出层部分 -->
<form name="f1" method="post">
<div class="modal-body">
<table class="table table-bordered">
<tbody>
 	<tr>
 	   <input type="hidden" name="id"/>
      <td align="right">项目名称:</td>
      <td align="left"><input name="pname" type="text"  class="span1-1" />
        [*]</td>
    </tr>
    <tr>
      <td align="right">项目开始时间:</td>
      <td align="left"><input name="starttime" type="text"  class="span1-1" /></td>
    </tr>
   <tr>
      <td align="right">项目结束时间:</td>
      <td align="left"><input name="endtime" type="text"  class="span1-1" /></td>
    </tr>
  
    <tr>
      <td align="right">业务员编号:</td>
      <td align="left"><input name="bianhao" type="text" value="${num}" class="span1-1" disabled="disabled"/></td>
    </tr>
    <tr>
      <td align="right">项目描述:</td>
      <td align="left"><input name="demo" type="text"  class="span1-1" /></td>
    </tr>
  </tbody>
</table>
</div>	
<div class="modal-footer">
	
	<input type="button" value="添加" onclick="addSubmit()"/>
    <input type="reset" value="取消" />
</div>
</div>
</form>
   <!-- 显示页面的表格 -->		
<table class="table table-bordered table-striped table-hover" width="500">
     <tbody>
       <tr align="center">
         <td nowrap="nowrap"><strong>ID</strong></td>
         <td nowrap="nowrap"><strong>项目名</strong></td>         
         <td nowrap="nowrap"><strong>开始时间</strong></td>
         <td nowrap="nowrap"><strong>结束时间</strong></td>
         <td nowrap="nowrap"><strong>员工编号</strong></td>
         <td nowrap="nowrap"><strong>项目状态</strong></td>
         </tr>
       <c:forEach items="${projectList}" var="project">
       	 <tr align="center">
         	<td nowrap="nowrap">${project.id}</td>
         	<td nowrap="nowrap">${project.pname}</td>
         	<td nowrap="nowrap"><fmt:formatDate value="${project.starttime}" pattern="yyyy-MM-dd"/></td>
         	<td nowrap="nowrap"><fmt:formatDate value="${project.endtime}" pattern="yyyy-MM-dd"/></td>
         	<td nowrap="nowrap">${project.bianhao}</td>
         	<td nowrap="nowrap">${project.demo}</td>
         </tr>
       </c:forEach> 
     </tbody>
   </table>
   <!-- 
   <table  class="margin-bottom-20 table  no-border" >
      <tr>
     	<td class="text-center"><input type="button" value="导出" class="btn btn-info" style="width:80px;" /></td>
      </tr> 
   </table>
   -->
</div>     
</div>
</div>
</body>
</html>

